﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace day5
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int a;
            Console.Write("请输入一个正整数:");
            a = int.Parse(Console.ReadLine());
            bool yes = true;
            for (int i = 1; i <= Math.Sqrt(a); i++)
            {
                if (a % i == 0)
                {
                    yes = false;
                    Console.WriteLine(a + "不是素数");
                    break;

                }
            }
            if (yes)
            {
                Console.WriteLine(a + "是素数");
            }

        }

    }
    }
